package com.woniuxy.consume;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class DirectConsume {
    @RabbitListener(queues = "directQueueA")
    public void receiveA(String msg){
        System.out.println("消费者A收到："+msg);
    }

    @RabbitListener(queues = "directQueueB")
    public void receiveB(String msg){
        System.out.println("消费者B收到："+msg);
    }
}
